package List;

public class test {
    public static void main(String[] args) {
        MyLinkedList list = new MyLinkedList();
        list.addFirst(1);
        list.addFirst(2);
        list.addFirst(3);
        list.remove(3);
        list.remove(1);
        list.display();
        list.addLast(1);
        list.addLast(2);
        list.addLast(3);
        list.display();
        list.addIndex(3,100);
        list.display();
//        list.addIndex(99999,1);
        System.out.println(list.contains(3));
        System.out.println(list.contains(100));

        System.out.println(list.size());
    }
    public static void main1(String[] args) {
        SinglyLinkedList list = new SinglyLinkedList();
        list.addFirst(99);
        list.addLast(1);
        list.addLast(2);
        list.addFirst(3);
        list.addFirst(100);
        list.addLast(3);
        list.display();
        list.remove(100);
        list.display();
        System.out.println(list.contains(3));
//        System.out.println(list.contains(100));
        System.out.println(list.size());
        list.addIndex(3,8765);
        list.display();
//        list.addIndex(999,0);
//        list.display();

        list.removeAllKey(3);
        list.display();
    }
}
